Skip to content

Fix Fedora/RedHat installation location (#474) #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

aostrowski-hbn
Copy link
Contributor

Those OSes have separate platlib and purelib directories. Symengine was installed partially into both from version 0.10.0 onwards.

This change marks some of it's packages as ext_modules, which makes setuptools treat the wheel as platform specific and install if fully into platlib (lib64) instead of purelib (lib), which should solve #474.

Those OSes have separate platlib and purelib directories.
Symengine was installed partially into both from version 0.10.0 onwards.

This change marks some of it's packages as ext_modules, which makes
setuptools treat the wheel as platform specific and install if fully
into platlib (lib64) instead of purelib (lib).

This should solve symengine#474.
@certik
Copy link
Contributor

certik commented Apr 1, 2025

Thanks for the fixes. The CI fails with:

+ python3 /home/runner/work/symengine.py/symengine.py/bin/test_python.py
Traceback (most recent call last):
  File "/home/runner/work/symengine.py/symengine.py/bin/test_python.py", line 4, in <module>
    import symengine
  File "/home/runner/our_usr/lib/python3.10/site-packages/symengine/__init__.py", line 12, in <module>
    import symengine.lib.symengine_wrapper as wrapper
ImportError: dynamic module does not define module export function (PyInit_lib)

Is this error caused by this PR, or is it in master already?

@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 2.8.12...4.0.0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to wait for symengine/symengine#2096 before this starts working. Will it be available right after it's merged or should we also wait for a release of the library?

Should we go with CMAKE_POLICY_VERSION_MINIMUM until symengine/symengine gets the fix?

setup.py Outdated
@@ -232,7 +232,7 @@ def finalize_options(self):
url="https://github.com/symengine/symengine.py",
python_requires='>=3.9,<4',
zip_safe=False,
packages=['symengine', 'symengine.lib', 'symengine.tests'],
packages=[],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this change causes the following error in CI:

ModuleNotFoundError: No module named 'symengine.test_utilities'

I reverted it in the latest commit.

@aostrowski-hbn
Copy link
Contributor Author

Thanks for the fixes. The CI fails with:

+ python3 /home/runner/work/symengine.py/symengine.py/bin/test_python.py
Traceback (most recent call last):
  File "/home/runner/work/symengine.py/symengine.py/bin/test_python.py", line 4, in <module>
    import symengine
  File "/home/runner/our_usr/lib/python3.10/site-packages/symengine/__init__.py", line 12, in <module>
    import symengine.lib.symengine_wrapper as wrapper
ImportError: dynamic module does not define module export function (PyInit_lib)

Is this error caused by this PR, or is it in master already?

It was just in my PR. I see the change setting SYMENGINE_INSTALL_PY_FILES=ON solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants